<!DOCTYPE html>
<html lang="en"  xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
    <head>
        <meta charset="UTF-8">
        <title>个人中心</title>
    </head>
    <body>
        <button>登录后显示的首页</button>
        <br>
        <a href="user/logout">退出登录</a>
        <br>
        <br>
        <!--org.springframework.security.core.Authentication的属性-->
        系统中保存的用户登录标记：
        <div sec:authentication="authorities"></div>
        <div sec:authentication="credentials"> </div>
        <div sec:authentication="details"> </div>
        <div sec:authentication="principal"> </div>
        <div sec:authentication="authenticated"> </div>

        控制页面显示效果 <br>
        <button sec:authorize="hasRole('ROLE_admin')">管理员角色</button>
        <button sec:authorize="hasRole('ROLE_user')">普通用户角色</button>
        <button sec:authorize="hasAuthority('book:select')">book:select</button>
        <button sec:authorize="hasAuthority('book:update')">book:update</button>
    </body>
</html>
